From: kaf24@firebug.cl.cam.ac.uk Date: Wed, 24 May 2006 13:49:24 +0000 (+0100) Subject: Remove unnecessary x86-specific mapping code from privcmd interface. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16025^2~23 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=f12403a5eafaad4428a126ca6ec203a57f441b18;p=xen.git Remove unnecessary x86-specific mapping code from privcmd interface. Signed-off-by: Keir Fraser --- diff --git a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c index 0c8b449348..9e747b3041 100644 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c @@ -159,10 +159,6 @@ static int privcmd_ioctl(struct inode *inode, struct file *file, break; case IOCTL_PRIVCMD_MMAPBATCH: { -#ifndef __ia64__ - mmu_update_t u; - uint64_t ptep; -#endif privcmd_mmapbatch_t m; struct vm_area_struct *vma = NULL; unsigned long __user *p; @@ -200,24 +196,12 @@ static int privcmd_ioctl(struct inode *inode, struct file *file, for (i = 0; i < m.num; i++, addr += PAGE_SIZE, p++) { if (get_user(mfn, p)) return -EFAULT; -#ifdef __ia64__ + ret = direct_remap_pfn_range(vma, addr & PAGE_MASK, - mfn, 1 << PAGE_SHIFT, + mfn, PAGE_SIZE, vma->vm_page_prot, m.dom); if (ret < 0) - goto batch_err; -#else - - ret = create_lookup_pte_addr(vma->vm_mm, addr, &ptep); - if (ret) - goto batch_err; - - u.val = pte_val_ma(pfn_pte_ma(mfn, vma->vm_page_prot)); - u.ptr = ptep; - - if (HYPERVISOR_mmu_update(&u, 1, NULL, m.dom) < 0) put_user(0xF0000000 | mfn, p); -#endif } ret = 0;